<%@ include file="/WEB-INF/view/include.jsp"%>
<div id="MainDetails">	
	<div class="t_form-top">
		<div class="t_select_employee">
			<label for="vvcEmployeeId" style="display:none;"><spring:message code="ctn.emp.lab" /></label>
			<input type="text" style="display:none;" id="vvcEmployeeId" name="vvcEmployeeId" value="${vvCancelModel.vvcEmployeeId}"	/>
			<label for="empName" ><spring:message code="ctn.visitor.name" /><span class="required-field"><spring:message code="label.field.required" /></span></label>
			<input type="text" id="empName" name="empName"  disabled="disabled" />
			<button type="button" onclick="openInGrid()" class="button_small" ><spring:message code="message.select.employee" /></button>
		</div>
	</div>
	<div class="t_form-left">
		<label for="empPermitNo"><spring:message code="ctn.employee.perm.no" /></label>
		<input type="text" id="empPermitNo" name="empPermitNo" disabled="disabled" />
		
		<label for="empIssueDate"><spring:message code="ctn.employee.issue.date" /></label>
		<input type="text" id="empIssueDate" name="empIssueDate" disabled="disabled" />
	</div>
	
	<div class="t_form-right">
		<label for="empStatus"><spring:message code="ctn.employee.status" /></label>
		<input type="text" id="empStatus" name="empStatus" disabled="disabled" />
		
		<label for="empExpDate"><spring:message code="ctn.employee.exp.date" /></label>
		<input type="text" id="empExpDate" name="empExpDate" disabled="disabled" />
	</div>
	<fieldset>
	 	<legend><spring:message code="ctn.init.visitor.leave" /></legend>
	</fieldset>
	<div class="t_form-top">
		<fieldset>
			<div class="radiobuttons" id="radioButtonsMain">
				<form:label path="vvcExitMode"><spring:message code="ctn.vvc.exit.mode.label" /></form:label>
				<form:radiobuttons path="vvcExitMode" onclick="onCancelTypeChange(this);" items="${exitModes}" itemLabel="displayLabel" itemValue="id"/>
			</div>
		</fieldset>
	</div>
	<div class="t_form_middle" <c:if test="${vvCancelModel.vvcExitMode!='STATUS_YES'}">style="display:none;"</c:if> id="exitDocumentContainer">
			<c:if test="${!isResubmit || vvCancelModel.vvcExitMode!='STATUS_YES'}">
				<label for="exitDocument" ><spring:message code="label.exit.document" /><span class="required-field"><spring:message code="label.field.required" /></span></label>
				<input type="file" id="exitDocument" name="exitDocument" style="float:left;" />
			</c:if>
			
			<c:if test="${isResubmit && vvCancelModel.vvcExitMode=='STATUS_YES'}">
					<div id="div${exitDocument.id }">
						<label for="exitDocument" ><spring:message code="label.exit.document" /><span class="required-field"><spring:message code="label.field.required" /></span></label>
						<input id="input${exitDocument.id }" type="text" value="${exitDocument.fileName}" disabled/>
						
						<a id="view${exitDocument.id }"  class="pdfimageattachment" href="file/${exitDocument.id}" title="${exitDocument.fileName}" style="width:15px;height:15px;display:inline; background: none;"><img alt="View" src="resources/images/common/show_img_icon.jpg" /></a>
						
						<img id="edit${exitDocument.id }" src="resources/images/common/view_icon.jpg" alt="edit" onclick="editAttachment('${exitDocument.id }','${exitDocument.attachmentTypeCode}','show');">
					 	<div id="prevexitDocument" style="display:none;">${exitDocument.fileName}</div>
						<input type="file" id="exitDocument" name="exitDocument" style="display:none" />
						<img id="remove${exitDocument.id }" src="resources/images/common/cancel_icon.jpg" alt="cancel" style="display:none;" onclick="editAttachment('${exitDocument.id }','${exitDocument.attachmentTypeCode}','hide');">
					</div>
					<div class="t_pop_up" style="float:left;">
						<div id="${exitDocument.id}">
						<img src="file/${exitDocument.id}" />
						</div>
					</div>
				
			</c:if>
	</div>
	<div class="t_form-left">
		
		
		<form:label path="vvcExitDate" ><spring:message code="ctn.visa.exit.date" /><span class="required-field"><spring:message code="label.field.required" /></span></form:label>
        <form:input path="vvcExitDate" cssClass="t_form-fld-disable_calendar" style="*-float:left;"  />
	
		<form:label path="vvcRemarks"><spring:message code="ctn.vvc.remarks" /></form:label>
        <form:textarea path="vvcRemarks" cssStyle="border:1px;" onkeyup="textLimit(this,50);" onblur="textLimit(this,50);"  cssClass="t_form-fld-disable" />
	</div>
	
	<div id="fm-submit">
		<button  class="button_small" id="Main-Next"><spring:message code="button.next" /></button>
	</div>
</div>